public class TimeManager extends Thread
{
    HardDisk hardDisk;
    boolean running = true;
    public TimeManager(HardDisk hardDisk)
    {
        this.hardDisk = hardDisk;
    }
    public void run()
    {
        try
        {
            sleep(1000);  
            while(running)
            {
                hardDisk.tick();
                sleep(500);                
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();    
        }
    }
}